//
//  QZOtherMyPriVC.m
//  shortvideoplay
//
//  Created by tikeios_002 on 2024/9/13.
//

#import "QZOtherMyPriVC.h"
@interface QZOtherMyPriVC ()<UIScrollViewDelegate>
@property (strong, nonatomic)UIScrollView * myCollection;
@property (strong, nonatomic)PublicView * nullView;
@property (nonatomic, copy) void(^listScrollViewScrollBlock)(UIScrollView *scrollView);
@end

@implementation QZOtherMyPriVC

- (void)showOldAddNavViewToMainOldView1{
    UIView * oldBgSS = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
    oldBgSS.clipsToBounds = YES;
       UILabel * oldshowSSSSTip = [[UILabel alloc]init];
    oldshowSSSSTip.clipsToBounds = YES;
    oldshowSSSSTip.text = @"kass显示区";
    oldshowSSSSTip.textColor = ColorHex(@"#f0f0f0");
    oldshowSSSSTip.textAlignment = NSTextAlignmentCenter;
    oldshowSSSSTip.font = [UIFont systemFontOfSize:28];
    oldshowSSSSTip.hidden = YES;
    [self.view addSubview:oldshowSSSSTip];
    [self.view addSubview:oldBgSS];
    
    UIButton * sendBtn = [[UIButton alloc]initWithFrame:CGRectMake(KScreen_W-75, kStatusBarHeight+10, 60, 46)];
    sendBtn.layer.cornerRadius = 3;
    sendBtn.backgroundColor = [UIColor whiteColor];
    [sendBtn setTitle:@"发送" forState:UIControlStateNormal];
    [sendBtn setTitleColor:ColorHex(@"#333333") forState:UIControlStateNormal];
    sendBtn.titleLabel.font = [UIFont systemFontOfSize:16];
    [sendBtn addTarget:self action:@selector(sendTap) forControlEvents:UIControlEventTouchUpInside];
    [oldBgSS addSubview:sendBtn];
    
    UIView * sendBg = [[UIView alloc]initWithFrame:CGRectMake(15, kStatusBarHeight+66, KScreen_W-30, (KScreen_H-KSafeAreaBottomHeight-25-(kStatusBarHeight+66))/2)];
    sendBg.backgroundColor = [UIColor whiteColor];
    sendBg.layer.cornerRadius = 3;
    [oldBgSS addSubview:sendBg];
    
    UILabel * sendTip = [[UILabel alloc]initWithFrame:CGRectMake(0, (sendBg.frame.size.height-40)/2, sendBg.frame.size.width, 40)];
    sendTip.text = @"发送区";
    sendTip.textColor = ColorHex(@"#f0f0f0");
    sendTip.textAlignment = NSTextAlignmentCenter;
    sendTip.font = [UIFont systemFontOfSize:28];
    [sendBg addSubview:sendTip];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.myCollection.hidden = NO;
    self.nullView.publicLabel.textColor = UIColor.whiteColor;
    if(self.priType == 1){
        self.nullView.imageView.image = KImageNamed(@"ic_public_suo_wite");
        self.nullView.publicLabel.text = @"隐私用户\n用户已经设置私密收藏，你不能访问Ta的收藏列表";
    }else if (self.priType == 2){
        self.nullView.imageView.image = KImageNamed(@"ic_public_suo_wite");
        self.nullView.publicLabel.text = @"隐私用户\n用户已经设置私密喜欢，你不能访问Ta的喜欢列表";;
    }
    self.nullView.hidden = NO;
}
- (UIScrollView *)myCollection{
    if(_myCollection == nil){

        _myCollection = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, KScreen_W, KScreen_H-KNav_H-40-45)];
        _myCollection.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
        _myCollection.backgroundColor = UIColor.clearColor;
        _myCollection.backgroundColor = viewback_black;
        _myCollection.alwaysBounceVertical = YES;
        _myCollection.delegate = self;
           UILabel * oldshowSSSSTip = [[UILabel alloc]init];
    oldshowSSSSTip.clipsToBounds = YES;
    oldshowSSSSTip.text = @"kass显示区";
    oldshowSSSSTip.textColor = ColorHex(@"#f0f0f0");
    oldshowSSSSTip.textAlignment = NSTextAlignmentCenter;
    oldshowSSSSTip.font = [UIFont systemFontOfSize:28];
    oldshowSSSSTip.hidden = YES;
    [self.view addSubview:oldshowSSSSTip];
    [self.view addSubview:_myCollection];
    }
    return _myCollection;
}
- (PublicView *)nullView{
    if(_nullView == nil){
        _nullView = [[PublicView alloc]initWithFrame:CGRectMake(0, (KScreen_H-self.headerHeigh-45-40-200)/2, KScreen_W, 200)];
        _nullView.publicLabel.text = @"隐私";
        _nullView.hidden = YES;
        _nullView.userInteractionEnabled = NO;
           UILabel * oldshowSSSSTip = [[UILabel alloc]init];
    oldshowSSSSTip.clipsToBounds = YES;
    oldshowSSSSTip.text = @"kass显示区";
    oldshowSSSSTip.textColor = ColorHex(@"#f0f0f0");
    oldshowSSSSTip.textAlignment = NSTextAlignmentCenter;
    oldshowSSSSTip.font = [UIFont systemFontOfSize:28];
    oldshowSSSSTip.hidden = YES;
    [self.view addSubview:oldshowSSSSTip];
    [self.view addSubview:_nullView];
    }
    return _nullView;
}
#pragma mark - GKPageListViewDelegate
#pragma mark - GKPageListViewDelegate
- (UIView *)listView {
    return self.view;
}

- (UIScrollView *)listScrollView {
    return self.myCollection;
}

- (void)listViewDidScrollCallback:(void (^)(UIScrollView *))callback {
    self.listScrollViewScrollBlock = callback;
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
    !self.listScrollViewScrollBlock ? : self.listScrollViewScrollBlock(scrollView);
}

@end
